
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpSoConfig.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpSoConfigForm"
 */
public class CcpSoConfigForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cscGuid = null;
   private java.lang.String _argCode = null;
   private java.lang.String _argName = null;
   private java.lang.String _argValue = null;
   private java.lang.String _inputType = null;
   private java.lang.String _dicCode = null;
   private java.lang.String _argDesc = null;
   private java.lang.String _argOrder = null;
   private java.lang.String _argType = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public CcpSoConfigForm() {
   }

   /**
    * Returns the cscGuid
    *
    * @return the cscGuid
    */
   public java.lang.String getCscGuid() {
      return _cscGuid;
   }

   /**
    * Sets the cscGuid
    *
    * @param cscGuid the new cscGuid value
    */
   public void setCscGuid(java.lang.String cscGuid) {
      _cscGuid = cscGuid;
   }
   /**
    * Returns the argCode
    *
    * @return the argCode
    */
   public java.lang.String getArgCode() {
      return _argCode;
   }

   /**
    * Sets the argCode
    *
    * @param argCode the new argCode value
    */
   public void setArgCode(java.lang.String argCode) {
      _argCode = argCode;
   }
   /**
    * Returns the argName
    *
    * @return the argName
    */
   public java.lang.String getArgName() {
      return _argName;
   }

   /**
    * Sets the argName
    *
    * @param argName the new argName value
    */
   public void setArgName(java.lang.String argName) {
      _argName = argName;
   }
   /**
    * Returns the argValue
    *
    * @return the argValue
    */
   public java.lang.String getArgValue() {
      return _argValue;
   }

   /**
    * Sets the argValue
    *
    * @param argValue the new argValue value
    */
   public void setArgValue(java.lang.String argValue) {
      _argValue = argValue;
   }
   /**
    * Returns the inputType
    *
    * @return the inputType
    */
   public java.lang.String getInputType() {
      return _inputType;
   }

   /**
    * Sets the inputType
    *
    * @param inputType the new inputType value
    */
   public void setInputType(java.lang.String inputType) {
      _inputType = inputType;
   }
   /**
    * Returns the dicCode
    *
    * @return the dicCode
    */
   public java.lang.String getDicCode() {
      return _dicCode;
   }

   /**
    * Sets the dicCode
    *
    * @param dicCode the new dicCode value
    */
   public void setDicCode(java.lang.String dicCode) {
      _dicCode = dicCode;
   }
   /**
    * Returns the argDesc
    *
    * @return the argDesc
    */
   public java.lang.String getArgDesc() {
      return _argDesc;
   }

   /**
    * Sets the argDesc
    *
    * @param argDesc the new argDesc value
    */
   public void setArgDesc(java.lang.String argDesc) {
      _argDesc = argDesc;
   }
   /**
    * Returns the argOrder
    *
    * @return the argOrder
    */
   public java.lang.String getArgOrder() {
      return _argOrder;
   }

   /**
    * Sets the argOrder
    *
    * @param argOrder the new argOrder value
    */
   public void setArgOrder(java.lang.String argOrder) {
      _argOrder = argOrder;
   }
   /**
    * Returns the argType
    *
    * @return the argType
    */
   public java.lang.String getArgType() {
      return _argType;
   }

   /**
    * Sets the argType
    *
    * @param argType the new argType value
    */
   public void setArgType(java.lang.String argType) {
      _argType = argType;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCscGuid() == null) {
         errors.add("cscGuid", new ActionError("error.cscGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
